package com.example.serviceorder.remote;

import com.example.internalcommon.dto.Car;
import com.example.internalcommon.dto.ResponseResult;
import com.example.internalcommon.response.OrderDriverResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author lyra
 * @Date 2023/4/26 9:50
 **/
@FeignClient("service-driver-user")
public interface ServiceDriverUserClient {

    @GetMapping("/city-code/is-available-driver")
    ResponseResult<Boolean> isAvailableDriver(@RequestParam String cityCode);

    @GetMapping("/get-available-driver/{carId}")
    ResponseResult<OrderDriverResponse> getAvailableDriver(@PathVariable("carId")Long carId);

    @GetMapping("/car")
    ResponseResult<Car> getCarById(@RequestParam Long carId);
}
